{% extends 'management/base.html' %}
{% load admin_helper %}

{% block subject %}链接列表{% endblock %}

{% block body %}
<a href="{% url 'management-link-add' %}" class="btn btn-primary btn-sm">增加</a>
<hr>
<table class="table table-hover">
    <thead>
        <tr>
            <th>名称</th>
            <th>链接</th>
            <th>动作</th>
        </tr>
    </thead>
    <tbody>
    {% for object in object_list %}
        <tr>
            <td>{{ object.title }}</td>
            <td><a href="{{ object.link }}" target="_blank">{{ object.link }}</a></td>
            <td>
                <a href="{% url 'management-link-edit' pk=object.id %}" class="btn btn-primary btn-xs" role="button">编辑</a>
                <a href="javascript:submit('{% url 'management-link-delete' pk=object.id %}')" class="btn btn-danger btn-xs confirm-alert" role="button">删除</a>
            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>
    {% include 'management/_pagination.html' %}
{% endblock %}